package com.changgou.goods.dao;

import com.changgou.goods.pojo.Para;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface ParaMapper extends Mapper<Para> {

    /**
     * 根据类别名称查询参数信息
     * @param categoryName
     * @return
     */
    @Select("select name,options from tb_para where template_id in( select template_id from tb_category where name =#{categoryName})")
    public List<Map> findParamListByCategoryName(@Param("categoryName") String categoryName);
}
